﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;
using Microsoft.Practices.EnterpriseLibrary.Data;

namespace Skynet.BusinessLogic.DataAccess
{

    public abstract class MasterRepository
    {
        
        public IUnityContainer  ContainerService { get; set; }

        public MasterRepository( IUnityContainer container)
        {
            this.ContainerService = container;
            
        }
        
    }

    

    
    public abstract class MasterRepository<T> :MasterRepository
    {
        public MasterRepository(IUnityContainer container) : base(container) { }
        public virtual void Add(T item) { throw new NotImplementedException(); }
        public virtual void Add(IEnumerable<T> items) { throw new NotImplementedException(); }
        public virtual void Update(T item) { throw new NotImplementedException(); }
        public virtual void Update(IEnumerable<T> items) { throw new NotImplementedException(); }
        public virtual void Delete(T item) { throw new NotImplementedException(); }
        public virtual void Delete(IEnumerable<T> items) { throw new NotImplementedException(); }
        public virtual T GetOne(object key) { throw new NotImplementedException(); }
        public virtual IEnumerable<T> GetAll() { throw new NotImplementedException(); }
    }
    public abstract class MasterDAABRepository<T> : MasterRepository<T>
    {
        public Database SkynetLibraryDatabase { get; set; }

        public MasterDAABRepository(IUnityContainer container): base(container)
        {
            SkynetLibraryDatabase = container.Resolve<Database>("SkynetLibrary");
        }        
    }
}
